JavaScript Design Patterns by Hugo Di Francesco

JavaScript Design Patterns by Hugo Di Francesco
Author: Hugo Di Francesco
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2024-02-14

Figure 5.14: /products/1 content

And when we load the /products/8 path, we see product 8’s name.

Figure 5.15: /products/8 content

We’ve now seen how to leverage Next.js features that automatically statically render pages with no data fetching, getStaticProps and getStaticPaths to render pages with dynamic content and with dynamic paths at build time, as well as how these approaches contrast with getServerSideProps.

Next, we’ll deep-dive into how to rehydrate a server-rendered react page on the client.